package huian.lee.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the shopinfo table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="shopinfo"
 */

public abstract class BaseShopinfo  implements Serializable {

	public static String REF = "Shopinfo";
	public static String PROP_USERINFO = "userinfo";
	public static String PROP_VIEWS = "views";
	public static String PROP_SHOPDESCRIPT = "shopdescript";
	public static String PROP_ID = "id";
	public static String PROP_SHOPCATE = "shopcate";
	public static String PROP_CLICK = "click";
	public static String PROP_SHOPPIC = "shoppic";
	public static String PROP_SHOPLEVEL = "shoplevel";
	public static String PROP_SHOPURL = "shopurl";
	public static String PROP_SHOPNAME = "shopname";


	// constructors
	public BaseShopinfo () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseShopinfo (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String shopname;
	private java.lang.String shoppic;
	private java.lang.String shopurl;
	private java.lang.String shopdescript;
	private java.lang.Integer views;
	private java.lang.Integer click;

	// many to one
	private huian.lee.entity.Shopcate shopcate;
	private huian.lee.entity.Userinfo userinfo;
	private huian.lee.entity.Shoplevel shoplevel;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: shopname
	 */
	public java.lang.String getShopname () {
		return shopname;
	}

	/**
	 * Set the value related to the column: shopname
	 * @param shopname the shopname value
	 */
	public void setShopname (java.lang.String shopname) {
		this.shopname = shopname;
	}



	/**
	 * Return the value associated with the column: shoppic
	 */
	public java.lang.String getShoppic () {
		return shoppic;
	}

	/**
	 * Set the value related to the column: shoppic
	 * @param shoppic the shoppic value
	 */
	public void setShoppic (java.lang.String shoppic) {
		this.shoppic = shoppic;
	}



	/**
	 * Return the value associated with the column: shopurl
	 */
	public java.lang.String getShopurl () {
		return shopurl;
	}

	/**
	 * Set the value related to the column: shopurl
	 * @param shopurl the shopurl value
	 */
	public void setShopurl (java.lang.String shopurl) {
		this.shopurl = shopurl;
	}



	/**
	 * Return the value associated with the column: shopdescript
	 */
	public java.lang.String getShopdescript () {
		return shopdescript;
	}

	/**
	 * Set the value related to the column: shopdescript
	 * @param shopdescript the shopdescript value
	 */
	public void setShopdescript (java.lang.String shopdescript) {
		this.shopdescript = shopdescript;
	}



	/**
	 * Return the value associated with the column: views
	 */
	public java.lang.Integer getViews () {
		return views;
	}

	/**
	 * Set the value related to the column: views
	 * @param views the views value
	 */
	public void setViews (java.lang.Integer views) {
		this.views = views;
	}



	/**
	 * Return the value associated with the column: click
	 */
	public java.lang.Integer getClick () {
		return click;
	}

	/**
	 * Set the value related to the column: click
	 * @param click the click value
	 */
	public void setClick (java.lang.Integer click) {
		this.click = click;
	}



	/**
	 * Return the value associated with the column: shopcate
	 */
	public huian.lee.entity.Shopcate getShopcate () {
		return shopcate;
	}

	/**
	 * Set the value related to the column: shopcate
	 * @param shopcate the shopcate value
	 */
	public void setShopcate (huian.lee.entity.Shopcate shopcate) {
		this.shopcate = shopcate;
	}



	/**
	 * Return the value associated with the column: userinfo
	 */
	public huian.lee.entity.Userinfo getUserinfo () {
		return userinfo;
	}

	/**
	 * Set the value related to the column: userinfo
	 * @param userinfo the userinfo value
	 */
	public void setUserinfo (huian.lee.entity.Userinfo userinfo) {
		this.userinfo = userinfo;
	}



	/**
	 * Return the value associated with the column: shoplevel
	 */
	public huian.lee.entity.Shoplevel getShoplevel () {
		return shoplevel;
	}

	/**
	 * Set the value related to the column: shoplevel
	 * @param shoplevel the shoplevel value
	 */
	public void setShoplevel (huian.lee.entity.Shoplevel shoplevel) {
		this.shoplevel = shoplevel;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof huian.lee.entity.Shopinfo)) return false;
		else {
			huian.lee.entity.Shopinfo shopinfo = (huian.lee.entity.Shopinfo) obj;
			if (null == this.getId() || null == shopinfo.getId()) return false;
			else return (this.getId().equals(shopinfo.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}